package uk.ac.glasgow.demosocs.users;

import uk.ac.glasgow.demosocs.Candidate;

/**
 * The Class Voter representing a Voter in the Voting System.
 * 
 * @author Project Team L
 */
public class Voter {

	/** The forename. */
	private String forename;

	/** The surname. */
	private String surname;

	/** The GUID. */
	private String GUID;

	/** The voted for. */
	private Candidate votedFor;

	/**
	 * Instantiates a new voter.
	 *
	 * @param voter the voter
	 */
	public Voter(Voter voter){
		this.forename = voter.getForename();
		this.surname = voter.getSurname();
		this.GUID = voter.getGUID();
	}
	
	public Voter(User user){
		this.forename = user.getForename();
		this.surname = user.getSurname();
		this.GUID = user.getGUID();
	}

	/**
	 * Instantiates a new voter.
	 *
	 * @param forename the forename
	 * @param surname the surname
	 * @param GUID the gUID
	 */
	public Voter(String forename,String surname,String GUID){
		this.forename = forename;
		this.surname = surname;
		this.GUID = GUID;
	}

	/**
	 * Gets the forename.
	 *
	 * @return the forename
	 */
	public String getForename() {
		return forename;
	}

	/**
	 * Sets the forename.
	 *
	 * @param forename the new forename
	 */
	public void setForename(String forename) {
		this.forename = forename;
	}

	/**
	 * Gets the surname.
	 *
	 * @return the surname
	 */
	public String getSurname() {
		return surname;
	}

	/**
	 * Sets the surname.
	 *
	 * @param surname the new surname
	 */
	public void setSurname(String surname) {
		this.surname = surname;
	}

	/**
	 * Gets the gUID.
	 *
	 * @return the gUID
	 */
	public String getGUID() {
		return GUID;
	}

	/**
	 * Sets the gUID.
	 *
	 * @param gUID the new gUID
	 */
	public void setGUID(String gUID) {
		GUID = gUID;
	}

	/**
	 * Gets the voted for.
	 *
	 * @return the voted for
	 */
	public Candidate getVotedFor() {
		return votedFor;
	}

	/**
	 * Sets the voted for.
	 *
	 * @param votedFor the new voted for
	 */
	public void setVotedFor(Candidate votedFor) {
		this.votedFor = votedFor;
	}
	
	public String toString(){
		return this.forename + " " + this.surname + " " + this.GUID;
	}

}
